package net.avh4.scratch.rpg.model;

import java.util.HashMap;


public class GameModel {
	
	static HashMap<String, Stat> existingCharacterStats = new HashMap<String, Stat>();
	
	static {
		existingCharacterStats.put("HP", new Stat(100,100));
	}
	
	public static Stat getDefaultStat(String key) {
		Stat defaultStat = existingCharacterStats.get(key);
		if (defaultStat == null) {
			// throw StatNotInModelException();
			defaultStat = generateCharacterStat(key);
			existingCharacterStats.put(key, defaultStat);
		}
		return defaultStat.clone();
	}

	private static Stat generateCharacterStat(String key) {
		return new Stat(10, 20);
	}

}
